/*操作日志api*/

import request from '@/utils/request'

const URL_PREFIX = '/sys/operationlog/'

const fetch = function(id) {
  return request({
    url: URL_PREFIX + id,
    method: 'post'
  })
}

const fetchList = function(queryParams) {
  return request({
    url: URL_PREFIX + `list?page=${queryParams.pageNum}&pageSize=${queryParams.pageSize}`,
    method: 'post',
    data: queryParams
  })
}

const fetchTypes = function() {
  return request({
    url: URL_PREFIX + 'types',
    method: 'post'
  })
}

const fetchResources = function() {
  return request({
    url: URL_PREFIX + 'resources',
    method: 'post'
  })
}

export default {
  fetch,
  fetchList,
  fetchTypes,
  fetchResources
}
